import java.util.Scanner;
public class text2 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        int a= sc.nextInt();
        System.out.println(a>=60?"及格":"不及格");
        if (a>=60&&a<70){
            System.out.println("及格");
        }else if (a>=70&&a<90){
            System.out.println("良好");
        }else{
            System.out.println("优秀");
        }
    }
}
